package com.leyou.item.service.impl;

import com.leyou.item.item.pojo.Category;
import com.leyou.item.mapper.CategoryMapper;
import com.leyou.item.service.ICategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author XiaoLuo
 * @ClassName: CategoryService
 * @Description: ${todo}
 * @date 2019/4/13 17:05
 */
@Service
public class CategoryService implements ICategoryService {
    @Autowired
    private CategoryMapper categoryMapper;
    @Override
    public List<Category> queryListByParent(Long pid) {
        Category category = new Category();
        category.setParentId(pid);

        return this.categoryMapper.select(category);
    }
}
